/**
 * 
 */
package com.zdy.im.tio.packets;

import com.sixeco.framework.common.api.ApiDesc;
import com.zdy.im.tio.command.Command;

import java.io.Serializable;
import java.util.List;

/**
 * 版本: [1.0]
 * 功能说明: 登陆命令请求包体
 * @Author 作者 : zdy
 * @CreateDate 创建时间: 2021-02-30
 */
public class LoginRequestVo implements Serializable {

	private static final long serialVersionUID = -10113316720288444L;
	/**
	 * 用户Id
	 */
	@ApiDesc(value = "用户Id",required = 1)
	private long userId;
	/**
	 * 用户群组Id集合;
	 */
	@ApiDesc(value = "用户群组Id集合,字符串,用逗号分隔",required = 1,type = "String")
	private List<Long> userGroupList;
	/**
	 * 密码
	 */
	@ApiDesc(value = "用户群组Id集合,字符串,用逗号分隔")
	private String password;
	/**
	 * 登陆token
	 */
	@ApiDesc(value = "用户验证token",required = 1)
	private String token;

	/**
	 * 握手协议编码cmd
	 */
	@ApiDesc(value = "握手协议编码cmd=5",required = 1)
	private int cmd;

	public LoginRequestVo(){}

	public LoginRequestVo(String token){
		this.token = token;
		this.cmd = Command.COMMAND_LOGIN_REQ.getNumber();
	}

	public LoginRequestVo(long userId, String password){
		this.userId = userId;
		this.password = password;
		this.cmd = Command.COMMAND_LOGIN_REQ.getNumber();
	}

	public LoginRequestVo(long userId, String password, String token){
		this(userId,password);
		this.token = token;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public long getUserId() {
		return userId;
	}
	public String getUserIds() {
		return String.valueOf(userId);
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

	public List<Long> getUserGroupList() {
		return userGroupList;
	}

	public void setUserGroupList(List<Long> userGroupList) {
		this.userGroupList = userGroupList;
	}

	public int getCmd() {
		return cmd;
	}

	public void setCmd(int cmd) {
		this.cmd = cmd;
	}
}
